package com.hunt.util;
public class ResultForNorth  extends Result {
    private  String state="0";
    private int code;
    private String msg;

    public String getState() {
        return state;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    @Override
    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public Object getData() {
        return data;
    }

    @Override
    public void setData(Object data) {
        this.data = data;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public void setCode(int code) {
        this.code = code;
    }

    private Object data = "";


    public ResultForNorth(int code, String msg, Object data,String state) {
        this.code = code;
        this.msg = msg;
        this.data = data;
        this.state=state;

    }

    public ResultForNorth(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
   //0是没有数据.1是有数据
    public static ResultForNorth success(Object data) {
        return new ResultForNorth(ResponseCode.success.getCode(), ResponseCode.success.getMsg(), data,"1");
    }
    public static ResultForNorth empty(Object data) {
        return new ResultForNorth(ResponseCode.success.getCode(), ResponseCode.success.getMsg(), data,"0");
    }
}
